﻿using Model.BusinessModel.OutPut;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Model.BusinessModel.MatchFormula
{
    /// <summary>
    /// 匹配数据输入模型
    /// </summary>
    public class MatchingDataInput
    {
        /// <summary>
        /// 组id
        /// </summary>
        public required string id { get; set; }

        /// <summary>
        /// 上级id
        /// </summary>
        public required string pid { get; set; }

        /// <summary>
        /// 匹配组
        /// </summary>
        public required string matchGroup { get; set; }

        /// <summary>
        /// 层级
        /// </summary>
        public int level { get; set; }

        /// <summary>
        /// 匹配条件
        /// </summary>
        public List<matchingWhereData> matchingWhere { get; set; } = new List<matchingWhereData>();

        /// <summary>
        /// 子集
        /// </summary>
        public List<MatchingDataInput> children { get; set; } = new List<MatchingDataInput>();
    }

    /// <summary>
    /// 匹配条件数据
    /// </summary>
    public class matchingWhereData {

        /// <summary>
        /// 项id
        /// </summary>
        public required string id { get; set; }

        /// <summary>
        /// 字段key（选中的字段）
        /// </summary>
        public required string fieldKey { get; set; }

        /// <summary>
        /// 符号key（选中的符号）
        /// </summary>
        public required string matchEquationKey { get; set; }

        /// <summary>
        /// 等式符号集合
        /// </summary>
       // public List<SelectOutPut> matchEquationOptions{get;set;} = new List<SelectOutPut>();

        /// <summary>
        /// 显示数据控件
        /// </summary>
        public int showDataControl { get; set; }

        /// <summary>
        /// 显示控件中的数据源类型
        /// </summary>
        public int showControlDataSourceType { get; set; }

        /// <summary>
        /// 绑定数据源
        /// </summary>
        public List<SelectOutPut> bindDataSource { get; set; } = new List<SelectOutPut>();

        /// <summary>
        /// 匹配数据key（选中的匹配值）
        /// </summary>
        public required object matchDataKey { get; set; }

        /// <summary>
        /// 匹配数据名称（选中的匹配值名称）
        /// </summary>
        public required object matchDataName { get; set; }
    }
}
